package com.george.auth.controller.excel;

import com.alibaba.fastjson.JSONObject;
import com.george.auth.service.excel.StCActivityRefundDiffStrategyImportExportService;
import com.george.common.entity.dto.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * @title: StCActivityRefundDiffStrategyImportExportController.java
 * @description: 电商活动退差策略-按明细导入导出相关控制器
 * @author: George.Dong
 * @date: 2024/2/21 15:35
 */
@RestController
@Api(value = "StCActivityRefundDiffStrategyImportExportController", description = "电商活动退差策略-按明细导入导出相关控制器")
public class StCActivityRefundDiffStrategyImportExportController {


    private final StCActivityRefundDiffStrategyImportExportService strategyImportExportService;

    public StCActivityRefundDiffStrategyImportExportController(StCActivityRefundDiffStrategyImportExportService strategyImportExportService) {
        this.strategyImportExportService = strategyImportExportService;
    }


    @ApiOperation(value = "按明细导出")
    @PostMapping(path = "/p/cs/refundStrategy/export")
    public ResponseEntity<Object> storeFrequencyExport(@RequestBody JSONObject jsonObject, HttpServletResponse response) {
        return strategyImportExportService.exportByItem(jsonObject,response);
    }

}
